#pragma once
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <sstream>
#include <string>

#include "Cond_type.h"
#include "Column.h"
#include "Column_bool.h"
#include "Column_int.h"
#include "Column_float.h"
#include "Column_string.h"
#include "Validator.h"

using namespace std;

struct Pair
{
	int sel;
	int msize;
	Pair(const int& s, const int& m) : sel(s), msize(m) {}
};

class Table
{
public:
	Table(string, string);
	~Table(void);

	void col_add();
	bool col_exists(const string&) const;
	void col_del();
	void col_list() const;
	void del(const bool& is_cond);
	void insert();
	void select(const bool& is_cond) const;
	void save() const;
	void drop();
	string get_name() const;

private:
	string db_name;
	string name; //the table's name
	bool dropped;
	
	int column_size;
	vector<Column*> column;

	string& dummy_data(string&, const string&, const int&, const bool&) const;
	int col_dat_qt() const;
	Pair column_selector() const;
};

